package com.cskaoyan.javase.basic._10loop;

import java.util.Scanner;

/**
 * 死循环举例
 *
 * @since 14:47
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo2 {
    public static void main(String[] args) {
        // 用死循环做测试
        while (true){
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入一个int整数:");
            int num = sc.nextInt();
            if (num > 0) {
                System.out.println("您输入的数是大于0!");
            }else {
                System.out.println("您输入的数不大于0!");
            }
        }
    }
}
